﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace INI配置文件的读写
{
    internal class myButton:Button
    {
        Point point1, point2, point3, point4, point5;
        Point[] pntArr=null;
        protected override void OnPaint(PaintEventArgs pevent)
        {
            this.Text = "";
            base.OnPaint(pevent);

            point1 = new Point(this.Width / 6, this.Height / 4);
            point2 = new Point(this.Width / 6, this.Height / 4*3);
            point3 = new Point(this.Width / 6*3, this.Height / 4*2);
            point4 = new Point(this.Width / 6*5, this.Height / 4);
            point5 = new Point(this.Width / 6*5, this.Height / 4*3);

            pntArr = new Point[] { point1, point2, point3, point4, point5 };
            Graphics g = pevent.Graphics;
            g.DrawPolygon(new Pen(valveColor), pntArr);
            g.FillPolygon(new SolidBrush(valveColor), pntArr);



        }
        private Color valveColor = Color.Yellow;
        [Description("阀门颜色"),Category("自定义")]
        public Color ValveColor
        {
            get { return valveColor; }
            set { valveColor = value; }
        }
        public enum _direction
        {
            chuizhi,
            shuipinhg,
        }
    }
}
